package com.fa.model
{
	import com.fa.map.Map;
	
	import flash.display.Shape;

	public class Food extends Shape{
		private var col:int;
		private var row:int;
		private var hasEat:Boolean;
		
		public function Food(row:int, col:int){
			super();
			this.graphics.beginFill(0x00FF00, 1);
			this.graphics.drawCircle((Map.TILE_SIZE/2), (Map.TILE_SIZE/2), (Map.TILE_SIZE/2));
			this.col = col;
			this.row = row;
			this.hasEat = false;
			updatePosition();
		}
		
		public function updatePosition():void
		{
			this.x = col * Map.TILE_SIZE;
			this.y = row * Map.TILE_SIZE;
		}
		
		public function getRow():int
		{
			return this.row;
		}
		
		public function getCol():int
		{
			return this.col;
		}
		
		public function beEaten():void
		{
			this.hasEat = true;
		}
		
		public function hasEaten():Boolean
		{
			return this.hasEat;
		}
	}
}